﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Markup;
using System.Windows.Media.Effects;
using WpfEffect3._5;

namespace WpfEffect
{
    /// <summary>
    /// PageOuterGlowBitmapEffect.xaml 的交互逻辑
    /// </summary>
    public partial class PageOuterGlowBitmapEffect : Page
    {
        public PageOuterGlowBitmapEffect()
        {
            InitializeComponent();

            effect.Changed += new EventHandler(dropEffect_Changed);
            Loaded += new RoutedEventHandler(PageDropshadowBitmapEffect_Loaded);
            lblColor.MouseLeftButtonDown += new MouseButtonEventHandler(lblColor_MouseLeftButtonDown);
        }

        void lblColor_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            effect.GlowColor = CommonHelper.GetWindowColor(lblColor);
             
        }

        void PageDropshadowBitmapEffect_Loaded(object sender, RoutedEventArgs e)
        {
            textBox1.Text = XamlWriter.Save(effect);
        }

        void dropEffect_Changed(object sender, EventArgs e)
        {
            textBox1.Text = XamlWriter.Save(effect);
        }
    }
}
